Deep Neural Network (DNN)

Machine learning can be categorized as supervised, semi-supervised, or unsupervised learning methods. Deep learning can be supervised or unsupervised, and it is based on artificial neural networks (ANN) with representation learning. In this article, we demonstrate implementing a deep neural network (DNN) in Keras.

Deep Neural Networks (DNNs), which is also known as convolutional networks, is comprised of several layers of nonlinear operations. The goal of deep learning methods is to learn feature hierarchies. Higher levels of features are formed by combining lower level features [1].

Dataset

a random n-class classification dataset can be generated using sklearn.datasets.make_classification. Here, we generate a dataset with two features and 5000 instances. Moreover, dataset is generated for a multiclass modeling.

Modeling

Train and Test sets

One of the efficient methods of splitting a dataset into random train and test subsets is using sklearn.model_selection.train_test_split.

Multi-layer Perceptron (MLP) for Binary classification

A multi-layer perceptron (MLP) is a class of feedforward artificial neural network (ANN). scikit-learn.org has a well-written article regarding MLP and interested readers are encouraged to see this article.

In this article, an MLP for binary classification using Keras is presented. We define our model by using Sequential class. Moreover, we consider the rectified linear unit) (ReLU) as the activation function. An activation function allows for complex relationships in the data to be learned. For the last year, we use the Sigmoid function. Some examples of Sigmond functions can be found here.

Let's define some function by which we can analyze the performance of the modeling.

Model Optimization Plot

Confusion Matrix

The confusion matrix allows for visualization of the performance of an algorithm.

Plot Classification


References

  1. S. Jothilakshmi, V.N. Gudivada, in Handbook of Statistics, 2016
  2. Keras developer guides
  3. Multilayer perceptron wikipedia page
  4. Confusion matrix wikipedia page